<?php

/*Connection to database*/
function init_bdd() {
	$my_db="test";
	$db = mysql_connect("localhost", "root", "") or die("Connection Error: ".mysql_error());
	mysql_select_db($my_db);
	return ($db);
}

/*execute a query*/
function bdd_query($query){
	$db = init_bdd();
	$result = mysql_query($query);
	mysql_close($db);
	return $result;
}

?>
